package grape.crm.rest.customerrelation.vo;
import grape.common.rest.vo.BaseIdVo;

import grape.common.service.trans.TransBy;
import grape.crm.service.customer.api.ICustomerService;
import grape.crm.service.relation.api.IRelationService;
import grape.crm.service.relationdetail.api.IRelationDetailService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 客户关系表
 * </p>
 *
 * @author yangwei
 * @since 2020-09-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="客户关系数据响应对象")
public class CustomerRelationVo extends BaseIdVo<String> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "客户id")
    private String customerId;

    @TransBy(type = ICustomerService.trans_customer_name_else_appellation,byFieldName = "customerId")
    @ApiModelProperty(value = "客户姓名")
    private String customerName;

    @ApiModelProperty(value = "另一个客户id")
    private String anotherCustomerId;

    @TransBy(type = ICustomerService.trans_customer_name_else_appellation,byFieldName = "anotherCustomerId")
    @ApiModelProperty(value = "另一个客户姓名")
    private String anotherCustomerName;


    @ApiModelProperty(value = "关系id，描述为客户是另一个客户的关系，如：张三是李四的父亲")
    private String relationId;

    @TransBy(type = IRelationService.trans_relation_name,byFieldName = "relationId")
    @ApiModelProperty(value = "关系名称")
    private String relationName;

    @ApiModelProperty(value = "关系详情id")
    private String relationDetailId;

    @TransBy(type = IRelationDetailService.trans_relation_detail_name,byFieldName = "relationDetailId")
    @ApiModelProperty(value = "关系详情名称")
    private String relationDetailName;

}
